
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[HistoryClear]
	@StartId INT,
	@EndId INT
AS
BEGIN
	
	DECLARE @Counter INT
	SET @Counter = @StartId
	
	WHILE @Counter < @EndId BEGIN
		UPDATE HistoryRecord SET Deleted = 1 WHERE Id = @Counter
		SET @Counter = @Counter + 1
	END
END
GO
